import hilog from '@ohos.hilog';

class log {
  private DOMAIN: number = 0x0000;
  private APP_NAME: string = 'Myapplication';

  public info(tag: string, ...args: string[]) {
    hilog.info(this.DOMAIN, `[${this.APP_NAME}.${tag}]`, '%{public}s', args.join(''));
  }
  public error(tag: string, ...args: string[]) {
    hilog.error(this.DOMAIN, `[${this.APP_NAME}.${tag}]`, '%{public}s', args.join(''));
  }
}

export const Log = new log();
